﻿using System;
using System.Web;
using SEAM.Exception;


/// <summary>
/// Summary description for ExceptionHandler
/// </summary>
public class ExceptionHandler : IHttpModule
{
    #region IHttpModule Members

    public void Dispose()
    {
    }

    public void Init(HttpApplication application)
    {
        application.Error += new EventHandler(application_Error);
    }

    #endregion

    void application_Error(object sender, EventArgs e)
    {
        ExceptionManager.PublishException(((HttpApplication)sender).Server.GetLastError());
    }

}
